package com.paas.form.core.model.js;

import com.paas.form.core.model.ElementUI;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Collections;
import java.util.Map;

@EqualsAndHashCode(callSuper = true)
@Data
public class VueProps extends ElementUI {

    private Map<String, Object> map;

    public VueProps(int indentNum) {

        this.indentNum = indentNum;
    }

    @Override
    public void getElHtml(StringBuilder str) {

    }

    @Override
    public void getStartTagElHtml(StringBuilder str) {
        String dataTemplate = String.join("", Collections.nCopies(indentNum, "\t")) + "Props: {";
        str.append(dataTemplate);
        str.append("\n");
    }

    @Override
    public void getEndTagElHtml(StringBuilder str) {
        String returnTemplate = String.join("", Collections.nCopies(indentNum, "\t")) + "},";
        str.append(returnTemplate);
        str.append("\n");
    }
}